﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Xml;

namespace Binding基础
{
    /// <summary>
    /// XML.xaml 的交互逻辑
    /// </summary>
    public partial class XML : Window
    {
        public XML()
        {
            InitializeComponent();

            XmlDataProvider xdp = new XmlDataProvider();

            XmlDocument doc = new XmlDocument();
            doc.Load(@"D:\_Z_SoftWare_Documents\vsProtect\WPF刘铁锰\Binding基础\XMLFile1.xml");
            xdp.Document = doc;

            xdp.Source = new Uri(@"D:\_Z_SoftWare_Documents\vsProtect\WPF刘铁锰\Binding基础\XMLFile1.xml");

            xdp.XPath = @"/StudentList/Student";
            this.listview.DataContext = xdp;
            this.listview.SetBinding(ListView.ItemsSourceProperty, new Binding());


        }
    }
}
